from sys import argv

script, input_m, output_m = argv

for ii in range(2,250+1):
	with open(input_m) as infile_m, open(output_m+str(ii)+'.m', 'w') as outfile_m:
		aa = {"ss="+str(1):"ss="+str(ii),"MC_"+str(1):"MC_"+str(ii)}
		for line in infile_m:
			for f,g in aa.items():
				line = line.replace(f,g)
			outfile_m.write(line)